//package com.yongbao.controller.admin;
//
//import com.yongbao.common.WebResponse;
//import com.yongbao.common.annotation.WebAccess;
//import com.yongbao.common.PageInfo;
//import com.yongbao.model.request.DishSpecificationRequest;
//import com.yongbao.service.DishSpecificationService;
//import com.yongbao.model.vo.DishSpecificationVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiResponse;
//import io.swagger.annotations.ApiResponses;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.validation.Valid;
//import java.util.List;
//
///**
// * @author zhanghong
// */
//@RestController
//@RequestMapping("/admin/dishSpecification")
//@Api(value = "菜品规格模块", tags = {"菜品规格模块"})
//public class AdminDishSpecificationController {
//
//    @Autowired
//    private DishSpecificationService dishSpecificationService;
//
//    @WebAccess(login = true)
//    @ApiOperation(value = "根据主键查询", httpMethod = "POST")
//    @ApiResponses(value = {@ApiResponse(code = 200, message = "success")})
//    @PostMapping("/get/{id}")
//    public WebResponse<DishSpecificationVO> getByKey(HttpServletRequest request, @PathVariable("id") long id) {
//        return WebResponse.build(dishSpecificationService.getByKey(id));
//    }
//
//    @WebAccess(login = true)
//    @ApiOperation("分页查询")
//    @PostMapping("/pageQuery")
//    public WebResponse<PageInfo<DishSpecificationVO>> pageQuery(@RequestBody DishSpecificationRequest request) {
//        return WebResponse.build(dishSpecificationService.pageQuery(request));
//    }
//
//    @WebAccess(login = true)
//    @ApiOperation("列表查询")
//    @PostMapping("/listQuery")
//    public WebResponse<List<DishSpecificationVO>> listQuery(@RequestBody DishSpecificationRequest request) {
//        return WebResponse.build(dishSpecificationService.listQuery(request));
//    }
//
//    @WebAccess(login = true)
//    @ApiOperation("新增")
//    @PostMapping("/add")
//    public WebResponse<Boolean> add(@Valid @RequestBody DishSpecificationRequest request) {
//        return WebResponse.build(dishSpecificationService.add(request));
//    }
//
//    @WebAccess(login = true)
//    @ApiOperation("修改")
//    @PostMapping("/update")
//    public WebResponse<Boolean> updateByKey(@Valid @RequestBody DishSpecificationRequest request) {
//        return WebResponse.build(dishSpecificationService.updateByKey(request));
//    }
//
//    @WebAccess(login = true)
//    @ApiOperation("删除")
//    @PostMapping("/delete")
//    public WebResponse<Boolean> deleteByKey(@RequestParam String ids) {
//        return WebResponse.build(dishSpecificationService.delByKey(ids));
//    }
//}
